﻿using System;
using System.Collections.Generic;
using ilgolosone.DomainModel.ValueObjects;
using ilgolosone.Shared.Domain;

namespace ilgolosone.DomainModel.Entities
{
    [Serializable]
    public class Restaurant : EntityBase, IAggregateRoot
    {
        public virtual string RestaurantName { get; set; }
        public virtual AddressInfo AddressInfo { get; set; }
        public virtual ContactInfo ContactInfo { get; set; }
        public virtual IList<Table> Tables { get; private set; }
        public virtual IList<Dish> Dishes { get; private set; }

        public Restaurant()
            : this(string.Empty)
        { }

        public Restaurant(string restaurantName)
        {
            RestaurantName = restaurantName;
            AddressInfo = new AddressInfo();
            ContactInfo = new ContactInfo();
            Tables = new List<Table>();
            Dishes = new List<Dish>();
        }

        public override string ToString()
        {
            return RestaurantName;
        }
    }
}
